It is known to validate coins by monitoring the outputs of a plurality of sensors each responsive to different characteristics of the coin, and determining that a coin is valid only if all the sensors produce outputs indicative of a particular coin denomination. Often, this is achieved by deriving from the sensors particular values indicative of specific parts of the sensor signal. For example, an electromagnetic sensor may form part of an oscillator, and the frequency of the oscillations may vary as a coin passes a sensor. In some arrangements, the peak value of the frequency variation is used as a parameter indicative of certain coin characteristics, and this value is compared with respective ranges each associated with a different coin denomination.
The peak frequency value is often obtained by taking successive samples of the output of the oscillator, and counting the number of cycles within each sample. The coin validator may have a microprocessor-based control circuit, and the microprocessor may be used for this counting operation in addition to other functions, such as checking that the measurements of the coin correspond to those of a valid coin.
FIG. 2 shows one prior art counting technique. The oscillator output is represented by successive cycles 1, 2, 3 . . . n of a waveform. At the leading edge of the first cycle, a timer is started. This measures a predetermined interval T, which may for example be 1mS. A second timer is also started at the same instant. Also, a counter starts to count the cycles of the waveform.
When the first timer has timed the predetermined period T, the microprocessor monitors the input waveform until the beginning of the next leading edge. At that point, the second timer is stopped, and the counter is also stopped. Assuming that the second timer has reached a value of t and the counter has reached the value n, the input frequency is given by n/t.
The use of the first counter ensures that the sample time is always approximately equal to T irrespective of the input frequency, and therefore cannot occupy an unduly long period, which would cause problems to other aspects of the validator operation.
In the alternative prior art arrangements shown in FIG. 3, a first timer is started at an arbitrary time and measures a predetermined period T. A second timer is started at the same time, and measures the period e.sub.1 to the leading edge of the next pulse. A counter is also started, for counting the cycles of the oscillator. When the first timer reaches the predetermined time T, a further timer measures the period e.sub.2 from the end of that period to the beginning of the next leading edge. The counter is then stopped.
In this arrangement, the frequency of the oscillator is given by n/(T-e.sub.1 +e.sub.2).
In both these arrangements, the timers operate at clock rates much higher than that of the frequency being measured, and both arrangements allow for precise measurement of frequency. However, each requires a plurality of timers, and each requires the processor to monitor the input waveform for the precise time at which the final leading edge is present.
The predetermined time period T is chosen to provide a compromise between a relatively accurate measurement, requiring a long sample time, and speed of operation, which may be crucial if the microprocessor has to perform other tasks at the same time.